package com.demo2do.fms.entity.data.business;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.demo2do.core.format.PersistentFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 装卸地
 * 
 * @author Ysy
 */
@Entity
@Table(name = "VW_LOAD_PLACE")
@PersistentFormat
public class LoadPlace {
    
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "assigned")
    private Long id;

    /** 装卸地代码 */
    @Column(name = "facility_code")
    private String code;
    
    /** 装卸地名称 */
    @Column(name = "facility_name")
    private String name;

    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    @JoinColumn(name = "geo_id", referencedColumnName = "id")
    @JsonIgnore(value = true)
    private City city;

    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * 
     * the default constructor
     */
    public LoadPlace() {
    	
    }

    /**
     * @return the id
     */
    public Long getId() {
        return this.id;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return this.code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return this.name;
    }

    /**
     * @return the city
     */
    public City getCity() {
        return this.city;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return this.disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param city the city to set
     */
    public void setCity(City city) {
        this.city = city;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
}
